<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.ButtonGroup类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_button_group.html">ButtonGroup</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_button_group-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.ButtonGroup类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.ButtonGroup 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_button_group.png" usemap="#awtk.ButtonGroup_map" alt=""/>
  <map id="awtk.ButtonGroup_map" name="awtk.ButtonGroup_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:aa0f33f28ab8606f7354efb71ee7b8835"><td class="memItemLeft" align="right" valign="top"><a id="aa0f33f28ab8606f7354efb71ee7b8835"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ButtonGroup</b> (long nativeObj)</td></tr>
<tr class="separator:aa0f33f28ab8606f7354efb71ee7b8835"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a72e76e46f3ecf696602a5016d3dc9800"><td class="memItemLeft" align="right" valign="top"><a id="a72e76e46f3ecf696602a5016d3dc9800"></a>
static <a class="el" href="classawtk_1_1_button_group.html">ButtonGroup</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:a72e76e46f3ecf696602a5016d3dc9800"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a781b86ad63c8acb26fde7a7ce7c99538"><td class="memItemLeft" align="right" valign="top">static Widget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_button_group.html#a781b86ad63c8acb26fde7a7ce7c99538">create</a> (Widget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a781b86ad63c8acb26fde7a7ce7c99538"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81bb44972b9d3995a3a0e619c8c3a4c2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_button_group.html">ButtonGroup</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_button_group.html#a81bb44972b9d3995a3a0e619c8c3a4c2">cast</a> (Widget widget)</td></tr>
<tr class="separator:a81bb44972b9d3995a3a0e619c8c3a4c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ab2cb28dc66bc52358032b750ac10932f"><td class="memItemLeft" align="right" valign="top"><a id="ab2cb28dc66bc52358032b750ac10932f"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:ab2cb28dc66bc52358032b750ac10932f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p><a class="el" href="classawtk_1_1_button.html">Button</a> Group控件。一个简单的容器控件，用于容纳一组按钮控件。</p>
<p>它本身不提供布局功能，仅提供具有语义的标签，让xml更具有可读性。 子控件的布局可用layout_children属性指定。 请参考https://github.com/zlgopen/awtk/blob/master/docs/layout.md "布局参数"。</p>
<p>button_group_t是widget的子类控件，widget_t的函数均适用于button_group_t控件。</p>
<p>在xml中使用"button\_group"标签创建button_group。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">button_group</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;m&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;40&quot;</span> <span class="keyword">children_layout</span>=<span class="stringliteral">&quot;default(c=4,r=1,s=5,m=5)&quot;</span>&gt;</div><div class="line">&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;open:basic&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Basic&quot;</span>/&gt;</div><div class="line">&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;open:button&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Buttons&quot;</span>/&gt;</div><div class="line">&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;open:edit&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Edits&quot;</span>/&gt;</div><div class="line">&lt;<span class="keywordtype">button</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;open:keyboard&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;KeyBoard&quot;</span>/&gt;</div><div class="line">&lt;/<span class="keywordtype">button_group</span>&gt;</div></div><!-- fragment --><p>可用通过style来设置控件的显示风格，如背景颜色等。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>&gt;</div><div class="line">&lt;<span class="keywordtype">normal</span>     <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> /&gt;</div><div class="line">&lt;/<span class="keywordtype">style</span>&gt;</div></div><!-- fragment --> </div><h2 class="groupheader">成员函数说明</h2>
<a id="a81bb44972b9d3995a3a0e619c8c3a4c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81bb44972b9d3995a3a0e619c8c3a4c2">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_button_group.html">ButtonGroup</a> awtk.ButtonGroup.cast </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为button_group对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>button_group对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>button_group对象。 </dd></dl>

</div>
</div>
<a id="a781b86ad63c8acb26fde7a7ce7c99538"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a781b86ad63c8acb26fde7a7ce7c99538">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Widget awtk.ButtonGroup.create </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建button_group对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/ButtonGroup.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
